package com.heatup.apt.model.order;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotations.IdType;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;

/**
 *
 * 订单信息 weixin_amt 新增一个微信支付金额字段用于混合支付 pay_type 支付类型(目前固定值1在线微信支付 2: 用户虚拟账户支付 3:
 * 企业储值卡支付 4：微信+个人储值卡混合支付) order_type 新增7包月卡类型
 *
 */
@TableName("order_info")
public class OrderInfo implements Serializable {

	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/** 主键 */
	@TableId(type = IdType.AUTO)
	private Integer id;

	/** 用户id */
	@TableField(value = "user_id")
	private Integer userId;

	/** 企业员工id */
	@TableField(value = "company_staff_id")
	private Long companyStaffId;

	/**
	 * 服务id(如果是课程订单，则service_id取service_price表，
	 * 如果是会员订单：则service_id取user_discount表id.
	 * 如果是用户虚拟账号充值，则service_id取recharge_discount表的id)
	 */
	@TableField(value = "service_id")
	private Integer serviceId;

	/** 用户领取的优惠券id(用户领取优惠券表的id） */
	@TableField(value = "coupon_detail_id")
	private Integer couponDetailId;

	/** 微信支付金额 */
	@TableField(value = "weixin_amt")
	private BigDecimal weixinAmt;

	/** 从用户虚拟账户消费的金额 */
	@TableField(value = "consume_amt")
	private BigDecimal consumeAmt;

	/** 实付总金额 */
	private BigDecimal amount;

	/** 订单状态(1正常 2取消 3排队 4完成) */
	@TableField(value = "order_status")
	private String orderStatus;

	/** 是否能取消(1是 2否) */
	@TableField(value = "cancel_able")
	private String cancelAble;

	/** 用户取消订单的时间。 */
	@TableField(value = "user_cancel_time")
	private Date userCancelTime;

	/** 是否可退款（1: 可退款。 0: 不可退款）。团课和自助健身在6个小时内，不可退款。 檬营在48小时内不退款，只重新加回库存。 */
	@TableField(value = "cancel_backmoney")
	private Integer cancelBackmoney;

	/** 支付类型(目前固定值1在线微信支付 2: 用户虚拟账户支付 3: 企业储值卡支付 4：微信+个人储值卡混合支付) */
	@TableField(value = "pay_type")
	private Integer payType;

	/** 订单提交时间 */
	@TableField(value = "created_time")
	private Date createdTime;

	/** 付款状态(1已付款 2未付款 3付款中 4已退款) */
	@TableField(value = "pay_status")
	private String payStatus;

	/** 付款时间 */
	@TableField(value = "pay_time")
	private Date payTime;

	/** 订单来源(10微信服务号) */
	@TableField(value = "order_source")
	private Integer orderSource;

	/**
	 * 订单类型(0普通订单 1团课订单 2私教订单 3檬营订单 4自助健身 5会员订单 6储值卡充值 7包月卡 8商品订单(该类型用在别处不在这张表)
	 */
	@TableField(value = "order_type")
	private Integer orderType;

	/** 订单号 */
	@TableField(value = "order_number")
	private String orderNumber;

	/** 城市 */
	@TableField(value = "city_id")
	private Integer cityId;

	/** 微信支付流水号 */
	@TableField(value = "trade_no")
	private String tradeNo;

	/** 更新人 */
	@TableField(value = "updated_by")
	private Integer updatedBy;

	/** 更新时间 */
	@TableField(value = "updated_time")
	private Date updatedTime;

	/** 版本号 */
	private Integer version;

	/** 0 未取消 1 主动取消 2 被动取消 */
	private Integer cancel;

	/** 用户门禁密码(8位数) */
	@TableField(value = "user_pwd")
	private String userPwd;

	/** 用户刷门次数计数(默认0) */
	@TableField(value = "user_pwd_use_count")
	private Integer userPwdUseCount;

	/** 用户门禁密码状态(默认1 有效 0 失效) */
	@TableField(value = "user_pwd_status")
	private Integer userPwdStatus;

	/** 原价 */
	@TableField(value = "prime_price")
	private BigDecimal primePrice;

	/** 交易编号 */
	@TableField(value = "trade_id")
	private String tradeId;

	/** 用户当时的折扣 */
	private Double discount;

	/**  */
	@TableField(value = "price_type_code")
	private String priceTypeCode;
	
	
	@TableField(exist = false)
	private int finishPeridos;  //私教用，已完成的课时
	
	/** 企业储值卡支付金额  */
	@TableField(value = "company_amt")
	private BigDecimal companyAmt;

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Long getCompanyStaffId() {
		return this.companyStaffId;
	}

	public void setCompanyStaffId(Long companyStaffId) {
		this.companyStaffId = companyStaffId;
	}

	public Integer getServiceId() {
		return this.serviceId;
	}

	public void setServiceId(Integer serviceId) {
		this.serviceId = serviceId;
	}

	public Integer getCouponDetailId() {
		return this.couponDetailId;
	}

	public void setCouponDetailId(Integer couponDetailId) {
		this.couponDetailId = couponDetailId;
	}

	public BigDecimal getWeixinAmt() {
		return this.weixinAmt;
	}

	public void setWeixinAmt(BigDecimal weixinAmt) {
		this.weixinAmt = weixinAmt;
	}

	public BigDecimal getConsumeAmt() {
		return this.consumeAmt;
	}

	public void setConsumeAmt(BigDecimal consumeAmt) {
		this.consumeAmt = consumeAmt;
	}

	public BigDecimal getAmount() {
		return this.amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getOrderStatus() {
		return this.orderStatus;
	}

	public void setOrderStatus(String orderStatus) {
		this.orderStatus = orderStatus;
	}

	public String getCancelAble() {
		return this.cancelAble;
	}

	public void setCancelAble(String cancelAble) {
		this.cancelAble = cancelAble;
	}

	public Date getUserCancelTime() {
		return this.userCancelTime;
	}

	public void setUserCancelTime(Date userCancelTime) {
		this.userCancelTime = userCancelTime;
	}

	public Integer getCancelBackmoney() {
		return this.cancelBackmoney;
	}

	public void setCancelBackmoney(Integer cancelBackmoney) {
		this.cancelBackmoney = cancelBackmoney;
	}

	public Integer getPayType() {
		return this.payType;
	}

	public void setPayType(Integer payType) {
		this.payType = payType;
	}

	public Date getCreatedTime() {
		return this.createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}

	public String getPayStatus() {
		return this.payStatus;
	}

	public void setPayStatus(String payStatus) {
		this.payStatus = payStatus;
	}

	public Date getPayTime() {
		return this.payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}

	public Integer getOrderSource() {
		return this.orderSource;
	}

	public void setOrderSource(Integer orderSource) {
		this.orderSource = orderSource;
	}

	public Integer getOrderType() {
		return this.orderType;
	}

	public void setOrderType(Integer orderType) {
		this.orderType = orderType;
	}

	public String getOrderNumber() {
		return this.orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

	public Integer getCityId() {
		return this.cityId;
	}

	public void setCityId(Integer cityId) {
		this.cityId = cityId;
	}

	public String getTradeNo() {
		return this.tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}

	public Integer getUpdatedBy() {
		return this.updatedBy;
	}

	public void setUpdatedBy(Integer updatedBy) {
		this.updatedBy = updatedBy;
	}

	public Date getUpdatedTime() {
		return this.updatedTime;
	}

	public void setUpdatedTime(Date updatedTime) {
		this.updatedTime = updatedTime;
	}

	public Integer getVersion() {
		return this.version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public Integer getCancel() {
		return this.cancel;
	}

	public void setCancel(Integer cancel) {
		this.cancel = cancel;
	}

	public String getUserPwd() {
		return this.userPwd;
	}

	public void setUserPwd(String userPwd) {
		this.userPwd = userPwd;
	}

	public Integer getUserPwdUseCount() {
		return this.userPwdUseCount;
	}

	public void setUserPwdUseCount(Integer userPwdUseCount) {
		this.userPwdUseCount = userPwdUseCount;
	}

	public Integer getUserPwdStatus() {
		return this.userPwdStatus;
	}

	public void setUserPwdStatus(Integer userPwdStatus) {
		this.userPwdStatus = userPwdStatus;
	}

	public BigDecimal getPrimePrice() {
		return this.primePrice;
	}

	public void setPrimePrice(BigDecimal primePrice) {
		this.primePrice = primePrice;
	}

	public String getTradeId() {
		return this.tradeId;
	}

	public void setTradeId(String tradeId) {
		this.tradeId = tradeId;
	}

	public Double getDiscount() {
		return this.discount;
	}

	public void setDiscount(Double discount) {
		this.discount = discount;
	}

	public String getPriceTypeCode() {
		return this.priceTypeCode;
	}

	public void setPriceTypeCode(String priceTypeCode) {
		this.priceTypeCode = priceTypeCode;
	}

	public int getFinishPeridos() {
		return finishPeridos;
	}

	public void setFinishPeridos(int finishPeridos) {
		this.finishPeridos = finishPeridos;
	}

	public BigDecimal getCompanyAmt() {
		return companyAmt;
	}

	public void setCompanyAmt(BigDecimal companyAmt) {
		this.companyAmt = companyAmt;
	}
	
	

}
